package org.ax.service.process.imple;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.ax.mapper.process.TechnologyMapper;
import org.ax.pojo.process.Technology;
import org.ax.service.process.TechnologyService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * 编程人:赵浩鑫
 * 时间:2021-02-26-21:14
 */
@Service
public class ITechnologyService extends ServiceImpl<TechnologyMapper, Technology> implements TechnologyService {
    @Override
    public List<Technology> findTechnologyList() {
        return getBaseMapper().selectList(null);
    }

    @Override
    public Technology toTechnologyIdFind(String technologyId) {
        return getBaseMapper().selectById(technologyId);
    }

    @Override
    public Page<Technology> searchPage(Page page) {
        return getBaseMapper().selectPage(page, null);
    }

    @Override
    public boolean addTechnology(Technology technology) {
        return getBaseMapper().insert(technology)>0;
    }

    @Override
    public boolean updateTechnology(Technology technology) {
        return getBaseMapper().updateById(technology)>0;
    }

    @Override
    public boolean deletesTechnology(String[] ids) {
        return getBaseMapper().deleteBatchIds(Arrays.asList(ids))>0;
    }
}
